<?php

namespace App\Utils\Server;

class ServerResult
{
    protected static function success(string $message = 'success', array $data = []): array
    {
        return [
            'code'    => 200,
            'message' => $message,
            'data'    => $data
        ];
    }

    protected static function error(string $message = 'error', array $data = []): array
    {
        return [
            'code'    => 201,
            'message' => $message,
            'data'    => $data
        ];
    }
}